package com.ym.b2b.tags;

import com.ym.b2b.product.service.EmBProductTypeService;
import com.ym.b2b.product.sqlbean.EmBProductType;
import com.ym.b2b.tags.base.BaseTag;
import com.zc.commons.base.Result;
import com.zc.commons.spring.SpringContextHolder;

/**
 * @ClassName: ProductCategoryTags
 * @Description: 分类标签
 * @Author 竺夏军
 * @Date 2015年1月28日 上午12:03:23
 * @Modify
 * @CopyRight 信息化团队
 */
public class ProductCategoryTags extends BaseTag {

    private static final long serialVersionUID = 895777383599438520L;

    protected String          productTypeCode;

    public int doStartTag() {
        Result ret = new Result();
        EmBProductType emBProductType = new EmBProductType();

        EmBProductTypeService emBProductTypeService = SpringContextHolder.getBean("emBProductTypeService");

        ret.putData("type", emBProductTypeService.searchEmBProductType(emBProductType));

        getPageContext().getRequest().setAttribute(getOutResponseAttrName(), ret);
        return EVAL_BODY_INCLUDE;
    }

    public String getProductTypeCode() {
        return productTypeCode;
    }

    public void setProductTypeCode(String productTypeCode) {
        this.productTypeCode = productTypeCode;
    }
}
